home *** CD-ROM | disk | FTP | other *** search
File List | 1989-12-06 | 5.3 KB | 220 lines |
- ' ======================================================================
- ' GFA-BASIC Video Effects Routines
- ' ======================================================================
- '
- ' by Carlos Tirado
- ' (C) Copyright 1990 by Antic Publishing, Inc.
- '
- ' ------------------------------
- ' BMOVE ROUTINES (Wipes)
- ' ------------------------------
- '
- ' This next subroutine "rollup" is not included in the Slide Show
- ' program SUSLSHOW.BAS If you intend to use it please note that
- ' it uses an additional 32000 bytes accessed by the pointer -scrn2-
- '
- Procedure Rollup
- Bmove Screen,Scrn2,32000
- For Ev=1 To 50
- Bmove Screen+32000-160*(Ev+Ev-1),Screen+32000-160*(Ev+Ev+1),Ev*160
- Bmove Scrn2+32000-160*(Ev+1),Screen+32000-160*(Ev+1),160
- Bmove Scrn1+32000-160*Ev,Screen+32000-160*Ev,160
- Next Ev
- For Ev=98 Downto 0
- Bmove Screen+160*Ev+320,Screen+160*Ev,7840
- Bmove Scrn2+160*Ev+8160,Screen+160*Ev+7840,160
- Bmove Scrn1+160*Ev+8000,Screen+160*Ev+8000,320
- Next Ev
- For Ev=7840 To 160 Step -160
- Bmove Screen+320,Screen,Ev
- Bmove Scrn2+Ev-160,Screen+Ev-160,160
- Bmove Scrn1+Ev,Screen+Ev,160
- Next Ev
- Bmove Scrn1,Screen,160
- Return
- '
- Procedure Rolldown
- For Ev=1 To 49
- Bmove Screen,Screen+320,160*Ev
- Bmove Scrn1+160*(Ev+Ev+1),Screen+160,160
- Bmove Scrn1+160*(Ev+Ev+2),Screen,160
- Next Ev
- For Ev=0 To 98
- Bmove Screen+160*Ev,Screen+160*Ev+320,7840
- Bmove Scrn1+160*Ev,Screen+160*Ev,160
- Bmove Scrn1+160*Ev+16160,Screen+160*Ev+160,160
- Next Ev
- For Ev=50 Downto 1
- Bmove Screen+32000-160*(Ev+Ev+1),Screen+32000-160*(Ev+Ev-1),Ev*160
- Bmove Scrn1+32000-160*(Ev+Ev+1),Screen+32000-160*(Ev+Ev+1),320
- Next Ev
- Return
- '
- Procedure Scroll
- For Ev=0 To 31680 Step 320
- Bmove Screen+320,Screen,31680
- Bmove Scrn1+Ev,Screen+31680,320
- Next Ev
- Return
- '
- Procedure Uncover
- For Ev=0 To 15840 Step 160
- Bmove Screen+160,Screen,15840
- Bmove Scrn1+Ev,Screen+15840,160
- Bmove Screen+16000,Screen+16160,15840
- Bmove Scrn1+31840-Ev,Screen+16000,160
- Next Ev
- Return
- '
- Procedure Cover
- For Ev=15840 To 0 Step -160
- Bmove Scrn1+Ev,Screen,16000-Ev
- Bmove Scrn1+16000,Screen+16000+Ev,16000-Ev
- Next Ev
- Return
- '
- Procedure Venetian
- Local Ev,Ev2
- For Ev=0 To 7840 Step 160
- For Ev2=0 To 24000 Step 8000
- Bmove Scrn1+8000-Ev-160+Ev2,Screen+Ev2,Ev+160
- Next Ev2
- Next Ev
- Return
- ' ----------------------------------
- ' BIT BLIT ROUTINES (Dissolves)
- ' ----------------------------------
- '
- ' Don't forget to include in your program the next line:
- ' DIM s%(5),d%(5),p%(8)
- '
- Procedure Setup_bitblit
- P%(0)=0 ! p%() coordinates & mode of Bit Blit
- P%(8)=3
- S%(0)=Scrn1 ! s%() contains SFMDB
- S%(1)=320-320*(Pct_res%<>0)
- S%(2)=200-200*(Pct_res%=2)
- S%(3)=Int((S%(1)+15)/16)
- S%(4)=0
- S%(5)=4-2*(Pct_res%)-(Pct_res%=2)
- D%(0)=Screen ! d%() contains DFMDB
- D%(1)=S%(1)
- D%(2)=S%(2)
- D%(3)=S%(3)
- D%(4)=0
- D%(5)=S%(5)
- Return
- '
- Procedure Iris
- @Setup_bitblit
- For Ev=1 To 39
- P%(0)=S%(1)/2-Ev*S%(1)/80
- P%(4)=P%(0)
- P%(1)=S%(2)/2-Ev*S%(2)/80
- P%(5)=P%(1)
- P%(2)=S%(1)/2+Ev*S%(1)/80-1
- P%(6)=P%(2)
- P%(3)=S%(2)/2+Ev*S%(2)/80-1
- P%(7)=P%(3)
- Bitblt S%(),D%(),P%()
- Next Ev
- Bmove Scrn1,Screen,32000
- Return
- '
- Procedure Rndom
- @Setup_bitblit
- Local A$
- A$=Space$(400)
- For Ev=0 To 399
- Dpoke Varptr(A$)+Ev*2,Ev
- Next Ev
- For Ev=399 Downto 0
- R=Random(Ev)
- Ev2=Dpeek(Varptr(A$)+R*2)
- P%(0)=(Ev2 Mod 20)*Int(S%(1)/20)
- P%(1)=Int(Ev2/20)*Int(S%(2)/20)
- P%(2)=P%(0)+Int(S%(1)/20)
- P%(3)=P%(1)+Int(S%(2)/20)
- P%(4)=P%(0)
- P%(5)=P%(1)
- P%(6)=P%(2)
- P%(7)=P%(3)
- Dpoke Varptr(A$)+R*2,Dpeek(Varptr(A$)+Ev*2)
- Bitblt S%(),D%(),P%()
- Next Ev
- Clr A$
- Return
- '
- Procedure Cross
- @Setup_bitblit
- For Ev=1 To 20
- P%(0)=0
- P%(1)=0
- P%(2)=Ev*S%(1)/40-1
- P%(3)=Ev*S%(2)/40
- P%(4)=P%(0)
- P%(5)=P%(1)
- P%(6)=P%(2)
- P%(7)=P%(3)
- Bitblt S%(),D%(),P%()
- P%(1)=S%(2)-P%(3)
- P%(3)=S%(2)-1
- P%(4)=P%(0)
- P%(5)=P%(1)
- P%(6)=P%(2)
- P%(7)=P%(3)
- Bitblt S%(),D%(),P%()
- P%(0)=S%(1)-P%(2)-1
- P%(2)=S%(1)-1
- P%(4)=P%(0)
- P%(5)=P%(1)
- P%(6)=P%(2)
- P%(7)=P%(3)
- Bitblt S%(),D%(),P%()
- P%(1)=0
- P%(3)=Ev*S%(2)/40
- P%(4)=P%(0)
- P%(5)=P%(1)
- P%(6)=P%(2)
- P%(7)=P%(3)
- Bitblt S%(),D%(),P%()
- Next Ev
- Return
- '
- Procedure Assemble
- @Setup_bitblit
- For Ev=0 To 39
- For Ev2=0 To 7
- P%(1)=Ev2*S%(2)/8
- P%(3)=P%(1)+S%(2)/8
- If Even(Ev2)
- P%(0)=Ev*S%(1)/40
- Else
- P%(0)=S%(1)-Ev*S%(1)/40-S%(1)/40
- Endif
- P%(2)=P%(0)+S%(1)/40-1
- P%(4)=P%(0)
- P%(5)=P%(1)
- P%(6)=P%(2)
- P%(7)=P%(3)
- Bitblt S%(),D%(),P%()
- Next Ev2
- Next Ev
- Return
- '
- Procedure Square
- @Setup_bitblit
- For Ev=0 To 99
- Ev2=Ev*2-Odd(Int(Ev*2/10))+99*(Ev>49)+2*(Odd(Int(Ev*2/10)) And Ev>49)
- P%(0)=(Ev2 Mod 10)*Int(S%(1)/10)
- P%(1)=Int(Ev2/10)*Int(S%(2)/10)
- P%(2)=P%(0)+Int(S%(1)/10)
- P%(3)=P%(1)+Int(S%(2)/10)
- P%(4)=P%(0)
- P%(5)=P%(1)
- P%(6)=P%(2)
- P%(7)=P%(3)
- Bitblt S%(),D%(),P%()
- Next Ev
- Return
-